<template>
  <a-badge-ribbon
    :color="color"
    :placement="placement"
    :text="text"
  >
    <template v-if="$slots.text" #text>
      <slot name="text" />
    </template>
    <slot />
  </a-badge-ribbon>
</template>

<script>
import { defineComponent } from 'vue'
import { BadgeRibbon } from 'ant-design-vue'
export default defineComponent({
  name: 'ZBadgeRibbon',
  components: {
    ABadgeRibbon: BadgeRibbon
  },
  props: {
    color: {
      type: String,
      default: undefined
    },
    placement: {
      type: String,
      default: 'end'
    },
    text: {
      type: [String, Function],
      default: undefined
    }
  }
})
</script>
